<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<style>

    #bootstrap-table tr:nth-child(even) {
        background: transparent !important;
    }

    #bootstrap-table th {
        background: transparent !important;
    }

    #bootstrap-table a {
        width: 100%;
        height: 100%;
        display: block;
        color: #000000;
    }

    #bootstrap-table a:hover {
        color: #000000;
    }

    #bootstrap-table a:visited {
        color: #000000;
    }

    #bootstrap-table a:active {
        color: #000000;
    }
</style>
<body class="hold-transition skin-yellow sidebar-mini">
<section class="content-header">
    <h1>安装进度查看</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm" class="form-horizontal">
                        <div class="row">
                            <div class="form-inline" style="padding-left: 15px">
                                <!--<input th:value="${prodOrd.prodNo}" name="prodNo" style="display: none" type="hidden"/>-->
                                <input th:value="${prodOrd.prodNo}" name="proCode" style="display: none" type="hidden"/>
                            </div>
                        </div>
                    </form>
                </div>
                <div id="toolBar">
                    <div class="row">
                        <div class="form-inline">
                            <div class="form-group">
                                <label>项目编号：</label>
                                <label th:text="${prodOrd.prodNo}"></label>
                            </div>
                            <div class="form-group">
                                <label>项目名称：</label>
                               <label th:text="${project.proName}"></label>-->
                            </div>
                            <div class="form-group">
                                <label>数量：</label>
                                <label th:text="${prodOrd.prodNum}"></label>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    let table;

    $(function () {
        /** 加载列表 */
        table = js.table.init({
            id: 'bootstrap-table',
            url: ctx + "create/shipmentsEdit/list",
            showExport: false,
            pageSize: 20,
            uniqueId: 'id',
            onClickRow: function (row, $element) {
                $('.info').removeClass('info');
                $($element).addClass('info');
            },
            columns: [
                {

                    title: '序号', field: 'id', width: '50',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: "生产令号", field: 'proCode'},
                {title: "项目名称", field: 'proName'},
                {title: "需方", field: 'customer'},
                {title: "发货地点", field: 'address'},
                {title: "负责人", field: 'leader'},
                {title: "接收人", field: 'relMan'},
                {title: "计划发货时间", field: 'planTime'},
                {title: "创建人", field: 'createName'},
                {title: "创建日期", field: 'createTime'},
                {
                    title: "提交状态", field: 'comit',
                    formatter: function (value) {
                        if (value==1){
                            return '<span class="badge label-default">未提交</span>';
                        }
                        if (value==2){

                            return '<span class="badge label-success">已提交</span>';
                        }
                    }
                },
                {
                    title: "操作",
                    formatter: function (value, row) {
                        let actions = [];
                        actions.push('<a class="btn btn-info btn-xs"  href="' +ctx + 'create/shipmentsEdit/listDetailSelect/' + row.id + '" > 查看</a>');

                        return actions.join('');
                    }
                }
            ]
        });
        /**
         * 表格搜索
         */
        $("#btn-search").click(function () {
            js.table.search(table);
        });
    });

    /**
     * 重新加载
     */
    function reLoad() {
        js.table.refresh(table);
    }

    /**
     * 查看
     */
    function viewInfo(id) {
        window.open(ctx + 'task/assemblySheetListView/detail/' + id);
    }
</script>
</body>
</html>